package com.bluefox.hospital.repository;

import com.bluefox.hospital.model.Department;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * DepartmentRepository
 *
 * @author Administrator
 */
public interface DepartmentRepository extends JpaRepository<Department, Long> {

    /*List<Department> findByParentIdOrderByDepartmentOrderDesc(Long parentId);
*/
    Department findByName(String name);

    /**
     *
     * @param isKeyDepartment
     * @return
     */
    List<Department> findByIsKeyDepartment(Integer isKeyDepartment);


}
